import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Login from '@/views/main/Login'
import Regist from '@/views/main/Regist'
import Forget from '@/views/main/Forget'
import Home from '@/views/main/Home'
import Main from '@/views/main/Main'
import Write from '@/views/email/Write'
import Get from '@/views/email/Get'
import Send from '@/views/email/Send'
import Det from '@/views/email/Detail'
import Drafts from '@/views/email/Drafts'
import Recycle from '@/views/email/Recycle'

Vue.use(Router)

export default new Router({
  // linkActiveClass: 'active',
  routes: [
    {
      path: '/',
      redirect: '/get'
    }, 
    // {
    //   path: '/home',
    //   component: Main,
    //   children: [{
    //     path: '',
    //     component: Home
    //   }]
    // },
    {
      path: '/write/:id', // 写信
      component: Main,
      children: [{
        path: '',
        component: Write
      }]
    },
    {
      path: '/get', // 收信
      component: Main,
      children: [{
        path: '',
        component: Get
      }]
    },
    {
      path: '/Recycle', // 回收站
      component: Main,
      children: [{
        path: '',
        component: Recycle
      }]
    },
    {
      path: '/Drafts', // 草稿箱
      component: Main,
      children: [{
        path: '',
        component: Drafts
      }]
    },
    {
      path: '/send', // 发件箱
      component: Main,
      children: [{
        path: '',
        component: Send
      }]
    },
    {
      path: '/det/:id', // 邮件详情
      component: Main,
      children: [{
        path: '',
        component: Det
      }]
    },
    {
      path: '/modify',
      component: Main,
      children: [{
        path: '',
        component: Forget
      }]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/regist',
      name: 'Regist',
      component: Regist
    },
    {
      path: '/forget',
      name: 'Forget',
      component: Forget
    }
  ]
})
